﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="DTBanHang.aspx.cs" Inherits="WebTeamplate.Admin_DTBanHang" %>
<%@ Import Namespace="WebTeamplate" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="../Js/BasicFunction.js"></script>

    <link href="../Js/calendar/calendar-win2k-cold-1.css" rel="stylesheet" type="text/css" />

    <script src="../Js/DateFunction.js"></script>

    <script type="text/javascript" src="../Js/calendar/calendar.js"></script>

    <script type="text/javascript" src="../Js/calendar/calendar-setup.js" language="javascript"></script>

    <script type="text/javascript" src="../Js/calendar/lang/calendar-en.js"></script>

    <table class="lvtBg" border="0" cellpadding="0" cellspacing="1" width="100%">
        <tbody>
            <tr>
                <td align="center">
                    <table class="small" border="0" cellpadding="2" cellspacing="5" width="100%">
                        <tr>
                            <td align="left" colspan="5" class="dvtCellErrorMessage">
                                <asp:ValidationSummary ID="vsumSumary" CssClass="validateSumary" DisplayMode="BulletList"
                                    runat="server" ShowMessageBox="true" ShowSummary="false" />
                                <asp:Label ID="lblErrorMessage" runat="server" CssClass="validateSumary"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" width="120px">
                                Khu:
                            </td>
                            <td align="left" width="120px">
                                <asp:DropDownList ID="drlKho" runat="server">
                                </asp:DropDownList>
                            </td>
                            <td align="right" width="80px">
                            </td>
                            <td align="left" width="220px">
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                Mã mặt hàng:
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtMaMatHang" runat="server" Width="120px"></asp:TextBox>
                            </td>
                            <td align="right">
                                Mã phụ tùng:
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtMaPhuTung" runat="server" Width="120px"></asp:TextBox>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblNgayNhap" runat="server" Text="Ngày"></asp:Label>:
                            </td>
                            <td align="left" colspan="4">
                                <asp:TextBox ID="txtNgayLapPhieuFrom" runat="server" Width="60px" MaxLength="10"
                                    onblur="this.className='detailedViewTextBox'" onfocus="this.className='detailedViewTextBoxOn'"
                                    CssClass="detailedViewTextBox"></asp:TextBox>
                                <img id="imgNgayLapPhieuFrom" alt="" title="Ngày lập phiếu" style="cursor: hand;
                                    text-align: left; vertical-align: middle; margin-bottom: 4px;" src="../images/imgCalendar.gif" />
                                <asp:CustomValidator runat="server" ID="cusvNgayLapPhieuFrom" ControlToValidate="txtNgayLapPhieuFrom"
                                    ClientValidationFunction="CheckInputDate">*</asp:CustomValidator>
                                ~
                                <asp:TextBox ID="txtNgayLapPhieuTo" runat="server" Width="60px" MaxLength="10" onblur="this.className='detailedViewTextBox'"
                                    onfocus="this.className='detailedViewTextBoxOn'" CssClass="detailedViewTextBox"></asp:TextBox>
                                <img id="imgNgayLapPhieuTo" alt="" title="Ngày lập phiếu" style="cursor: hand; text-align: left;
                                    vertical-align: middle; margin-bottom: 4px;" src="../images/imgCalendar.gif" />
                                <asp:CustomValidator runat="server" ID="cusvNgayLapPhieuTo" ControlToValidate="txtNgayLapPhieuTo"
                                    ClientValidationFunction="CheckInputDate">*</asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td align="left" colspan="4">
                                <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click"
                                    meta:resourcekey="btnSearchResource1" CssClass="crmbutton small edit" />
                                <asp:Button ID="btnReset" runat="server" Text="Reset" OnClientClick="return ClearFrom();"
                                    meta:resourcekey="btnResetResource1" CssClass="crmbutton small edit" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <hr noshade="noshade" size="1">
                </td>
            </tr>
            <%if (tongSoPhieu > 0)
              { %>
            <tr>
                <td>
                    Tổng số phiếu báo giá: <%=tongSoPhieu %> &nbsp;&nbsp;&nbsp;&nbsp;>> <%=linkDS %>
                </td>
            </tr>
            <tr>
                <td>
                    Tổng thành tiền: <%=thanhtienNumber %> <%=CommonFunction.DEFAULT_VND_CURENCY%> <span class="textCurency">(<%=thanhtienText %> )</span>
                </td>
            </tr>
            <%}
              else
              { %>
            <tr>
                <td>
                    Không có kết quả nào được tìm thấy
                </td>
            </tr>
            
            <%} %>
        </tbody>
    </table>

    <script language="javascript" type="text/javascript">
        var txtNgayLapPhieuFrom = document.getElementById("<%= txtNgayLapPhieuFrom.ClientID %>");
        SetupCalendar(txtNgayLapPhieuFrom.id, "imgNgayLapPhieuFrom");
        var txtNgayLapPhieuTo = document.getElementById("<%= txtNgayLapPhieuTo.ClientID %>");
        SetupCalendar(txtNgayLapPhieuTo.id, "imgNgayLapPhieuTo");
    </script>

    <script type="text/javascript">

        function ClearFrom() {
            document.getElementById('<%=drlKho.ClientID %>').value = '';
            document.getElementById('<%=txtNgayLapPhieuFrom.ClientID %>').value = '';
            document.getElementById('<%=txtNgayLapPhieuTo.ClientID %>').value = '';
            document.getElementById('<%=txtMaMatHang.ClientID %>').value = '';
            document.getElementById('<%=txtMaPhuTung.ClientID %>').value = '';


            return false;
        }
               
    </script>

</asp:Content>
